home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / database / dg53.zip / DGREAD.ME < prev    next >
Text File  |  1997-05-27  |  8KB  |  185 lines

  1.  
  2.                           dg - Data-Grep   v. 53
  3.  
  4. Grep is one of the classic tools used in UNIX (and many DOS versions
  5. exist) to search for strings in an ASCII text file, printing the
  6. lines with finds.  
  7.  
  8. dg is like grep but for searching a free-form, ASCII, flatfile 
  9. database, printing entire records rather than just the lines containing 
  10. the searched-for phrase. Pronounced "dig" as in "digging out data." 
  11.  
  12. dg will search a text file for a given phrase and print all "records" 
  13. containing that phrase to standard output. Records are free-form
  14. chunks of text separated by a standard delimiter, normally an asterisk.
  15. Other delimiters can be used. Treating plain paragraphs as delimited 
  16. records is an option. See the accompanying .sam sample files for 
  17. examples. dg is usable only with plain ASCII text files. 
  18.  
  19. Here is an example piece of a flatfile with a very casual structure:
  20.  
  21. ----------------------------------------------------------------
  22. John Smith   BIOLIONS CORP.
  23. 44 Main Street
  24. Austin TX
  25.  
  26. specialties: biochemistry, herbs, football
  27. note: RA conference, 12-96
  28. *
  29. Jane Doe  GEOTIGERS CO.
  30. 333 S. 44 St.
  31. Atlanta GA
  32.  
  33. specialties: vulcanism, plate tectonics, GPS, Japanese, 
  34. geodesy, x-ray spectra, island formation, collects HO trains.
  35. *
  36. ----------------------------------------------------------------
  37.  
  38. The command:  dg tectonics filename
  39. would print all of Jane Doe's record.. and any other records
  40. in the file that mentioned tectonics.
  41.  
  42. There are numerous search and output options; learn only what you need.
  43. Put commonly used combinations into batch files or aliases.
  44.  
  45. It is for use in a DOS mode only, either directly or from batch files.
  46. Almost all of the standard UNIX utilities are available in DOS
  47. versions and can be used together in batch files to powerful effect.
  48. dg adds a new tool to that suite.
  49.  
  50. All major testing has been in UNIX or plain DOS, though 
  51. it seems to work fine in Windows 3.1 or Windows 95 DOS modes.
  52. An executable for HP UNIX, compiled on an HP(9000) is included.
  53.  
  54. ---------------------------------------------------------------------
  55. Files included:
  56.  
  57. dg.exe          the dg executable program (for DOS)
  58. dgman           the dg manual
  59. dgw.bat         for use when searching across multiple files
  60. dgh.bat         dg options-help batch file
  61. go.bat          runs a set of examples
  62. whatsnew        summary of updates with this release
  63. dgread.me       this file
  64. sample.dat      a demo-baseline file used by go.bat (not for direct reading)
  65. *.sam           sample data files used by go.bat
  66. dghp53          the dg executable program (for HP-UX)
  67.  
  68.  
  69. ---------------------------------------------------------------------
  70. Suggested Quick Familiarization:
  71. ---------------------------------------------------------------------
  72.         DO THIS:                                Commands:
  73.         --------                                ---------
  74.  
  75.     copy these files to a \dg directory
  76.  
  77.     from that directory:
  78.  
  79.     Skim the file minerals.sam:                type minerals.sam | more
  80.     dig out the records that   
  81.     mention azurite:                           dg azurite minerals.sam
  82.  
  83.     Skim the file lincoln.sam:                 type lincoln.sam | more
  84.     run the demo, part1:                       go dem1
  85. ---------------------------------------------------------------------
  86. Skim over the dgman manual file.               type dgman | more
  87. ---------------------------------------------------------------------
  88. Experiment with extended help:                 dgh -v
  89. ---------------------------------------------------------------------
  90. Run parts of the demo by entering:
  91.                                                go dem1   or               
  92.                                                go dem2   or               
  93.                                                go dem3   or               
  94.                                                go dem4   or               
  95.                                                go dem5   or               
  96.                                                go dem6   or               
  97.                                                go list   or               
  98.                                                go all    (not recommended)
  99.  
  100.  
  101. The demo will create a temp.bat, and some .tem files and a zzapfile.
  102. These may be deleted after the demo is completed.
  103.  
  104. Only advanced users should bother with dem5 and dem6.
  105.  
  106. The demo is not intended to be all-encompassing.  Options
  107. not addressed in the demo are left as exercises for the user.
  108. ---------------------------------------------------------------------
  109. Put the \dg directory in your path so that the programs
  110. can be accessible from any directory.
  111. ---------------------------------------------------------------------
  112. ---------------------------------------------------------------------
  113.  
  114. ---------------------------------------------------------------------
  115.                          NOTICE
  116. ---------------------------------------------------------------------
  117.  
  118. This version of dg is not released to the public domain and is the sole 
  119. and copyright property of Pete Marikle.  You may bundle this version of 
  120. dg with any free or commercial product but you may not sell it 
  121. separately.  You may, however, distribute dg in the manner of ShareWare, 
  122. charging for distribution and handling only. 
  123.  
  124. This version is freeware for personal, individual use.  This in thanks 
  125. to the spirit of all those who have provided freeware versions of grep, 
  126. awk, sed, and all the other UNIX family utilities for DOS users.  I've 
  127. used dg in batch files and scripts along with almost every UNIX family 
  128. utility; some combination has always fit the bill needed. 
  129.  
  130. I disclaim all warranties as to this software, whether express or 
  131. implied, including any implied warranties of merchantability, fitness 
  132. for a particular purpose, functionality, data integrity or protection. 
  133.  
  134. To repeat, there is no warranty of any kind.  The copyright owner may 
  135. not be held liable for any damages, including any lost profits or other 
  136. incidental or consequential damages arising out of use or inability to 
  137. use the software.  By using the software, you agree to this. 
  138.  
  139. You are also explicitly cautioned to back up all files used in 
  140. association with this software and to satisfy yourself to your own 
  141. standards as to its behavior and the suitability of any and all results 
  142. to your purpose. 
  143.  
  144. This software and the accompanying documentation are:
  145.  
  146.                 Copyright (C) 1996 by
  147.                    Peter A. Marikle
  148.                    531 W Mineral Ave #316
  149.                    Littleton CO 80120
  150.  
  151. ---------------------------------------------------------------------
  152.                 RELEASE NOTES dg, version 53
  153. ---------------------------------------------------------------------
  154.  
  155. This is the third public release of dg.  See the whatsnew file
  156. for differences since version 51. Consider dg a beta version in 
  157. all respects.  No software I've seen has been bug-free. dg will not be 
  158. an exception. 
  159.  
  160. I have used dg for some 5-7 years now, adding options only when I needed 
  161. some new behavior. Regression testing is done to discover side effects 
  162. of any changes, but no formal "product" level testing has been 
  163. warranted. I've run it against dozens of varied "flat" files, and 
  164. against files up to about 5 megabytes in size.  It has done the things 
  165. _I_ wanted done with the kinds of files _I_ use.  _You_ must determine 
  166. whether it fits _your_ intended usage. 
  167.  
  168. dg has numerous options that can be used together. Most insensible or 
  169. unsupported combinations are trapped as errors.  Undoubtedly other 
  170. combinations will be found that do not behave as someone might expect, 
  171. and are not trapped because I didn't see a likelihood they'd be tried in 
  172. combination. 
  173.  
  174. Some options and option combinations can be conceptually complex; 
  175. results may be what I consider correct, but may or may not be what you 
  176. would expect. 
  177.  
  178. It is your responsibility NOT to trust the output until you have tested 
  179. YOUR usage to YOUR standards. 
  180.  
  181. Bug reports or recommendations or comments to PMarikle@aol.com
  182. ---------------------------------------------------------------------
  183.  
  184.  
  185.